package com.simen.kv.sample;

import android.database.sqlite.SQLiteOpenHelper;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.simen.kv.DbHelper;

public class HelperActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_helper);

        findViewById(R.id.listDb).setOnClickListener(v -> {
            SQLiteOpenHelper sqLiteOpenHelper = DbHelper.getSqlOpenHelper(HelperActivity.this, "simple_kv");
            DbHelper.printAll(sqLiteOpenHelper.getReadableDatabase());
        });
    }
}
